var app = getApp()
Page({
  data: {
    arr: [
      { id: 0, img: "../../img/pro1.jpg", name: "七喜碳酸喜碳酸 330ml", num: "2", price: "14"},
      { id: 1, img: "../../img/pro2.jpg", name: "加多宝凉茶植物饮料盒装", num: "1", price: "5.8" },
      { id: 2, img: "../../img/pro3.jpg", name: " 维他 低糖维他柠檬茶（柠檬味茶饮料）", num: "3", price: "1.8" },
    ],
  },  
  //获取当前位置
  onLoad: function (e) {    
    var that = this;
    var order_id = e.order_id;
    console.log(e)
    var app = getApp();
    that.setData({
      url: app.globalData.url,
    })
    wx.request({
      url: that.data.url+"/index.php/business/Order/order_info",
      data:{
        order_id:order_id
      },
      success:function(res){
        that.setData({
          arr:res.data.order_info,
          address:res.data.address,
          order:res.data.order
        })
      }
    })
  },
  toOrder: function() {
    wx.navigateTo({
      url: '../index/index',
      orderOrBusiness: 'order',
    })
  }
})